package com.boc.ewr.business.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.boc.ewr.business.entity.CaUncaAll;
import org.apache.ibatis.annotations.Select;
import org.springframework.data.repository.query.Param;

import java.util.List;

/**
 * @Description: 未对账数据汇总表
 * @Author: jeecg-boot
 * @Date:   2023-04-20
 * @Version: V1.0
 */
public interface CaUncaAllMapper extends BaseMapper<CaUncaAll> {

    @Select("SELECT a.* from CA_ACCT_DTL_A2 a LEFT JOIN ACCT_LNGTM_UNCA_DTL b ON a.ACC_NO = b.ACCT_NO where a.CHECK_TIME between to_date(#{startline},'yyyy-MM-dd') and to_date(#{endline},'yyyy-MM-dd')")
    List<CaUncaAll> creatA2TypeInfo(@Param("startline") String startline, @Param("endline") String endline);

    @Select("SELECT a.* from CA_ACCT_DTL_A3 a LEFT JOIN ACCT_LNGTM_UNCA_DTL b ON a.ACC_NO = b.ACCT_NO where a.CHECK_TIME between to_date(#{startline},'yyyy-MM-dd') and to_date(#{endline},'yyyy-MM-dd')")
    List<CaUncaAll> creatA3Typenfo(@Param("startline") String startline, @Param("endline") String endline);

    @Select("SELECT a.* from CA_ACCT_DTL_C a LEFT JOIN ACCT_LNGTM_UNCA_DTL b ON a.ACC_NO = b.ACCT_NO where a.CHECK_TIME between to_date(#{startline},'yyyy-MM-dd') and to_date(#{endline},'yyyy-MM-dd')")
    List<CaUncaAll> creatCTypeInfo(@Param("startline") String startline, @Param("endline") String endline);
}
